package com.example.bootasync.service;

import com.example.bootasync.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.bootasync.entity.bo.OrderMsgBo;

import java.time.LocalDateTime;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author JiMing Zhou
 * @since 2023-06-02
 */
public interface IOrderService extends IService<Order> {

    /**
     * 存储订单
     * @param userId 用户id
     * @param prodId 商品id
     * @param createTime 创建时间
     * @return 是否成功
     */
    Boolean subOrder(Long userId, Long prodId, LocalDateTime createTime);

    /**
     * MQ存储bo订单信息
     * @param bo 消息bo
     */
    void saveOrder(OrderMsgBo bo);

}
